// pages/decoration-knowledge/index.js

Component({
  behaviors: [],
  properties: {
  },
  /**
   * 页面的初始数据
   */
  data: {
    pageList: []
  },
  methods: {
    itemClickHandle(event) {
      wx.navigateTo({
        url: `/pages/fqa-detail/fqa-detail?id=${event.currentTarget.dataset.id}`,
      })
    },
    pageDataHandle(event) {
      const {page, list = []} = event.detail;
      let setData = {}
  
      // list.forEach(item => {
      //   item.image_path = globalData.imageUrl + item.image_path,
      //   item.create_time = item.create_time ? item.create_time.split(' ')[0] : ''
      // })
  
      if (page == 1) {
        setData.pageList = [list]
      } else {
        setData[`pageList[${page}]`] = list
      }
  
      this.setData(setData)
    },
  }
})